home *** CD-ROM | disk | FTP | other *** search
/ Amiga Developer CD v2.1 / Amiga Developer CD v2.1.iso / NDK / NDK_1.3 / Autodocs1.3 / DevicesA-K / input.doc < prev    next >
Text File  |  1988-10-16  |  7KB  |  244 lines

  1. TABLE OF CONTENTS
  2.  
  3. input.device/AddHandler
  4. input.device/RemHandler
  5. input.device/Reset
  6. input.device/SetMPort
  7. input.device/SetMTrig
  8. input.device/SetMType
  9. input.device/SetPeriod
  10. input.device/SetThresh
  11. input.device/Start
  12. input.device/WriteEvent
  13.  
  14.  
  15. input.device/AddHandler                 input.device/AddHandler
  16.  
  17.    NAME
  18.     AddHandler - add an input handler to the device
  19.  
  20.    FUNCTION
  21.     Add a function to the list of functions called to handle
  22.     input events generated by this device.  The function is called
  23.     as
  24.         newInputEvents = Handler(inputEvents, handlerData);
  25.         D0                 A0          A1
  26.  
  27.    IO REQUEST
  28.     io_Message    mn_ReplyPort set
  29.     io_Device    preset by OpenDevice
  30.     io_Unit        preset by OpenDevice
  31.     io_Command    IND_ADDHANDLER
  32.     io_Data        a pointer to an interrupt structure.
  33.         is_Data     the handlerData pointer described above
  34.         is_Code    the Handler function address
  35.  
  36.    NOTES
  37.     The interrupt structure is kept by the input device until a
  38.     RemHandler command is satisfied for it.
  39.  
  40.  
  41. input.device/RemHandler                 input.device/RemHandler
  42.  
  43.    NAME
  44.     RemHandler - remove an input handler from the device
  45.  
  46.    FUNCTION
  47.     Remove a function previously added to the list of handler
  48.     functions.
  49.  
  50.    IO REQUEST
  51.     io_Message    mn_ReplyPort set
  52.     io_Device    preset by OpenDevice
  53.     io_Unit        preset by OpenDevice
  54.     io_Command    IND_REMHANDLER
  55.     io_Data        a pointer to the interrupt structure.
  56.  
  57.    NOTES
  58.     This command is not immediate
  59.  
  60.  
  61. input.device/Reset                           input.device/Reset
  62.  
  63.    NAME
  64.     Reset - reset the input device
  65.  
  66.    FUNCTION
  67.     Reset resets the input device without destroying handles
  68.     to the open device.
  69.  
  70.    IO REQUEST
  71.     io_Message    mn_ReplyPort set if quick I/O is not possible
  72.     io_Device    preset by the call to OpenDevice
  73.     io_Unit        preset by the call to OpenDevice
  74.     io_Command    CMD_RESET
  75.     io_Flags    IOB_QUICK set if quick I/O is possible
  76.  
  77.  
  78. input.device/SetMPort                     input.device/SetMPort
  79.  
  80.    NAME
  81.     SetMPort - set the current mouse port
  82.  
  83.    FUNCTION
  84.     This command sets the gameport port at which the mouse is
  85.     connected.
  86.  
  87.    IO REQUEST
  88.     io_Message    mn_ReplyPort set if quick I/O is not possible
  89.     io_Device    preset by the call to OpenDevice
  90.     io_Unit        preset by the call to OpenDevice
  91.     io_Command    IND_SETMPORT
  92.     io_Flags    IOB_QUICK set if quick I/O is possible
  93.     io_Length    1
  94.     io_Data        a pointer to a byte that is either 0 or 1,
  95.             indicating that mouse input should be obtained
  96.             from either the left or right controller port,
  97.             respectively.
  98.  
  99.  
  100. input.device/SetMTrig                     input.device/SetMTrig
  101.  
  102.    NAME
  103.     SetMTrig - set the conditions for a mouse port report
  104.  
  105.    FUNCTION
  106.     This command sets what conditions must be met by a mouse
  107.     before a pending Read request will be satisfied.  The trigger
  108.     specification is that used by the gameport device.
  109.  
  110.    IO REQUEST
  111.     io_Message    mn_ReplyPort set if quick I/O is not possible
  112.     io_Device    preset by the call to OpenDevice
  113.     io_Unit        preset by the call to OpenDevice
  114.     io_Command    IND_SETMTRIG
  115.     io_Flags    IOB_QUICK set if quick I/O is possible
  116.     io_Length    sizeof(gameportTrigger)
  117.     io_Data        a structure of type GameportTrigger, which
  118.             has the following elements
  119.         gpt_Keys -
  120.             GPTB_DOWNKEYS set if button down transitions
  121.             trigger a report, and GPTB_UPKEYS set if button up
  122.             transitions trigger a report
  123.         gpt_Timeout    -
  124.             a time which, if exceeded, triggers a report;
  125.             measured in vertical blank units (60/sec)
  126.         gpt_XDelta    -
  127.             a distance in x which, if exceeded, triggers a
  128.             report
  129.         gpt_YDelta    -
  130.             a distance in x which, if exceeded, triggers a
  131.             report
  132.  
  133.  
  134. input.device/SetMType                     input.device/SetMType
  135.  
  136.    NAME
  137.     SetMType - set the current mouse port controller type
  138.  
  139.    FUNCTION
  140.     This command sets the type of device at the mouse port, so
  141.     the signals at the port may be properly interpreted.
  142.  
  143.    IO REQUEST
  144.     io_Message    mn_ReplyPort set if quick I/O is not possible
  145.     io_Device    preset by the call to OpenDevice
  146.     io_Unit        preset by the call to OpenDevice
  147.     io_Command    IND_SETMTYPE
  148.     io_Flags    IOB_QUICK set if quick I/O is possible
  149.     io_Length    1
  150.     io_Data        the address of the byte variable describing
  151.             the controller type, as per the equates in
  152.             the gameport include file
  153.  
  154.  
  155. input.device/SetPeriod                   input.device/SetPeriod
  156.  
  157.    NAME
  158.     SetPeriod - set the key repeat period
  159.  
  160.    FUNCTION
  161.     This command sets the period at which a repeating key repeats.
  162.  
  163.     This command always executes immediately.
  164.  
  165.    IO REQUEST - a timerequest
  166.     io_Message    mn_ReplyPort set if quick I/O is not possible
  167.     io_Device    preset by the call to OpenDevice
  168.     io_Unit        preset by the call to OpenDevice
  169.     io_Command    IND_SETPERIOD
  170.     io_Flags    IOB_QUICK set if quick I/O is possible
  171.     io_tv_Secs    the repeat period seconds
  172.     io_tv_Micro    the repeat period microseconds
  173.  
  174.  
  175. input.device/SetThresh                   input.device/SetThresh
  176.  
  177.    NAME
  178.     SetThresh - set the key repeat threshold
  179.  
  180.    FUNCTION
  181.     This command sets the time that a key must be held down before
  182.     it can repeat.  The repeatability of a key may be restricted
  183.     (as, for example, are the shift keys).
  184.  
  185.     This command always executes immediately.
  186.  
  187.    IO REQUEST - a timerequest
  188.     io_Message    mn_ReplyPort set if quick I/O is not possible
  189.     io_Device    preset by the call to OpenDevice
  190.     io_Unit        preset by the call to OpenDevice
  191.     io_Command    IND_SETTHRESH
  192.     io_Flags    IOB_QUICK set if quick I/O is possible
  193.     io_tv_Secs    the threshold seconds
  194.     io_tv_Micro    the threshold microseconds
  195.  
  196.  
  197. input.device/Start                           input.device/Start
  198.  
  199.    NAME
  200.     Start - restart after stop
  201.  
  202.    FUNCTION
  203.     Start restarts the unit after a stop command.
  204.  
  205.    IO REQUEST
  206.     io_Message    mn_ReplyPort set if quick I/O is not possible
  207.     io_Device    preset by the call to OpenDevice
  208.     io_Unit        preset by the call to OpenDevice
  209.     io_Command    CMD_START
  210.     io_Flags    IOB_QUICK set if quick I/O is possible
  211.  
  212.  
  213. input.device/WriteEvent                 input.device/WriteEvent
  214.  
  215.    NAME
  216.     WriteEvent - propagate input event(s) to all handlers
  217.  
  218.    FUNCTION
  219.  
  220.    IO REQUEST
  221.     io_Message    mn_ReplyPort set if quick I/O is not possible
  222.     io_Device    preset by the call to OpenDevice
  223.     io_Unit        preset by the call to OpenDevice
  224.     io_Command    IND_WRITEEVENT
  225.     io_Flags    IOB_QUICK set if quick I/O is possible
  226.     io_Length    the size of the io_Data area in bytes: there
  227.             are sizeof(inputEvent) bytes per input event.
  228.     io_Data        a buffer area with input events(s).  The
  229.             fields of the input event are:
  230.         ie_NextEvent
  231.             links the events together, the last event
  232.             has a zero ie_NextEvent.
  233.         ie_Class
  234.         ie_SubClass
  235.         ie_Code 
  236.         ie_Qualifier 
  237.         ie_X, ie_Y
  238.         ie_TimeStamp 
  239.             as desired
  240.  
  241.    NOTES
  242.     The contents of the input event(s) are destroyed.
  243.  
  244.